<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:cc="http://java.sun.com/jsf/composite"
	xmlns:t="http://myfaces.apache.org/tomahawk">

<cc:interface>
	<cc:attribute name="idPanel" required="true" />
	<cc:attribute name="mBean" required="true" />
	<cc:attribute name="pagina" required="true" />
	<cc:attribute name="titulo" required="true" />
	<cc:attribute name="telaRetorno" required="true" />
</cc:interface>

<cc:implementation>
	<p:panel id="#{cc.attrs.idPanel}" header="Cadastro" column="2"
		style="width: 600px;">
		<f:facet name="header">
			<h:outputText value="#{cc.attrs.titulo}" />
			<h:commandButton action="#{cc.attrs.telaRetorno}" immediate="true"
				image="/resources/images/icons/img_close.png" style="float: right;" />
		</f:facet>
		<h:panelGrid columns="2">

			<ui:include src="#{cc.attrs.pagina}" />
			<h:panelGrid columns="3" style="padding-left: 0px">
				<h:commandButton image="#{msg['btn.icon.salvar']}" alt="Editar"
					title="Editar" action="#{cc.attrs.mBean.editar}" />
			</h:panelGrid>
			<h:panelGrid columns="3" style="padding-left: 0px">
				<h:commandButton image="#{msg['btn.icon.limpar']}" alt="Salvar"
					title="Salvar" action="#{cc.attrs.mBean.salvar}" />
			</h:panelGrid>
		</h:panelGrid>
	</p:panel>
	<p:draggable for="#{cc.attrs.idPanel}" />
</cc:implementation>
</html>